﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ICommand.cs" company="">
//   
// </copyright>
// <summary>
//   The Command interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.UseCases
{
    using System;

    /// <summary>
    ///   The Command interface.
    /// </summary>
    public interface ICommand : IViewBindable
    {
        #region Public Properties

        /// <summary>
        ///   Gets a value indicating whether activate use case.
        /// </summary>
        bool ActivateUseCase { get; }

        /// <summary>
        ///   Gets the description.
        /// </summary>
        string Description { get; }

        /// <summary>
        ///   Gets the id.
        /// </summary>
        Guid Id { get; }

        /// <summary>
        ///   Gets a value indicating whether is long running.
        /// </summary>
        bool IsLongRunning { get; }

        /// <summary>
        ///   Gets a value indicating whether is modifying.
        /// </summary>
        bool IsModifying { get; }

        /// <summary>
        ///   Gets the text.
        /// </summary>
        string Text { get; }

        /// <summary>
        ///   Gets the use case.
        /// </summary>
        IUseCase UseCase { get; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        ///   The execute.
        /// </summary>
        void Execute();

        /// <summary>
        /// The get argument.
        /// </summary>
        /// <param name="name">
        /// The name. 
        /// </param>
        /// <typeparam name="T">
        /// </typeparam>
        /// <returns>
        /// The <see cref="T"/> . 
        /// </returns>
        T GetArgument<T>(string name);

        /// <summary>
        /// The set argument.
        /// </summary>
        /// <param name="name">
        /// The name. 
        /// </param>
        /// <param name="value">
        /// The value. 
        /// </param>
        /// <typeparam name="T">
        /// </typeparam>
        void SetArgument<T>(string name, T value);

        #endregion
    }
}